package com.ningxia.water.controller.report;

import com.ningxia.water.reuslt.Result;
import com.ningxia.water.reuslt.ResultResponse;
import com.ningxia.water.service.ITsWellInfoService;
import com.ningxia.water.vo.out.ReportVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/wellreport")
@Api(tags = "报表管理-机井报表")
public class WellReportController {

    @Autowired
    private ITsWellInfoService wellInfoService;

    @GetMapping("/getwellreport")
    @ApiOperation("获取机井报表数据")
    public Result getWellReport(@RequestParam String type, @RequestParam String currentTime){
        List<ReportVo> list = wellInfoService.getWellReport(type, currentTime);
        return ResultResponse.getSuccessResult(list);
    }
}
